package com.linkage.book.repository;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import com.linkage.book.pojo.Book;
/**
 * 
 * @author LuoYunHui
 *
 */
@Repository
public interface BookRepository {
	public List<Book> queryAll();

    public void save(Book book);

    public void update(Book book);

    public void delete(@Param("bookId") int bookId);

    public Book loadOne(@Param("bookId") int bookId);
    
    public Book loadByBookName(@Param("bookName") String bookName);
    
    public List<Book> getBooksByCategoryId(@Param("categoryId") int categoryId);
    
    public List<Book> getBooksByBookName(@Param("bookName") String bookName);
    
    public List<Book> getBooksByCombination(@Param("bookName") String bookName, @Param("author") String author, @Param("press") String press);
    
   
}
